<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="common_css :: commonHeader('资源库管理')"></head>
<body>
<!--搜索框-->
<form method="post" id="tabfrom">
    <div style="padding:2px" class="easyui-panel" title="数据查询">
        <table class="form-table">
            <tr>
                <td align="right">资源库类型：</td>
                <td>
                    <input style="width:150px" id="sleFtype"
                           data-options="valueField:'value',textField:'showmsg' ,panelHeight:'auto',prompt:'==请选择=='"
                           class="easyui-combobox"/>
                </td>
                <td align="right" width="10%">资源库名称：</td>
                <td>
                    <input id="selName" style="width:150px"/>
                    <a class="easyui-linkbutton" iconCls='icon-search' onclick="doSearch();">查询</a>
                </td>
            </tr>
        </table>
    </div>
    <br>
</form>
<div id="toolbar">
    <shiro:hasPermission name="kettle:job:datasource:add">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add"
           onclick="addJobDatasource()">添加</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="kettle:job:datasource:edit">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-edit"
           onclick="editJobDatasource()">修改</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="kettle:job:datasource:del">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel"
           onclick="delJobDatasource()">删除</a>
    </shiro:hasPermission>
</div>

<div id="dg"></div>

<div id="dlg" class="easyui-dialog" style="width:650px;height:500px"
     closed="true" modal="true" maximizable="true" resizable="true">
    <form id="myform" method="post">
        <div style="padding:20px">
            <table cellpadding="2px" cellspacing="0" class="form-table">
                <input type="hidden" class="easyui-validatebox" name="id"/>
                <tr>
                    <td align="right">类型：</td>
                    <td><input id="ftype" name="ftype" editable="false" style="width:300px;"
                               data-options="valueField:'value',textField:'showmsg' ,panelHeight:'auto',prompt:'==请选择=='"
                               class="easyui-combobox"/></td>
                </tr>
                <tr>
                    <td align="right">名称：</td>
                    <td><input class="easyui-validatebox" style="width:300px;" name="name"
                               data-options="required:true"
                               missingMessage="请输入名称"/></td>
                </tr>
                <tr>
                    <td align="right">用户名：</td>
                    <td><input class="easyui-validatebox" style="width:300px;" name="username"
                               data-options="required:true"
                               missingMessage="请输入用户名"/></td>
                </tr>
                <tr>
                    <td align="right">密码：</td>
                    <td><input type="password" class="easyui-validatebox" style="width:300px;" name="password"
                               data-options="required:true"
                               missingMessage="请输入密码"/></td>
                </tr>
                <tr>
                    <td align="right">IP地址：</td>
                    <td>
                        <input class="easyui-validatebox" style="width:300px;" name="dbHost" id="dbHost"
                               data-options="required:true"
                               missingMessage="请输入IP地址"/>
                    </td>
                </tr>
                <tr>
                    <td align="right">数据库名称：</td>
                    <td><input class="easyui-validatebox" style="width:300px;" name="dbName" id="dbName"
                               data-options="required:true"
                               missingMessage="请输入数据库名称"/></td>
                </tr>
                <tr>
                    <td align="right">端口号：</td>
                    <td><input class="easyui-validatebox" style="width:300px;" name="dbPort" id="dbPort"
                               data-options="required:true"
                               missingMessage="请输入端口号"/></td>
                </tr>

                <tr>
                    <td align="right">地址：</td>
                    <td><input class="easyui-validatebox" style="width:300px;" name="url" id="url"/></td>
                </tr>
                <tr>
                    <td align="right">驱动：</td>
                    <td><input class="easyui-validatebox" style="width:300px;" name="driverClassName"
                               id="driverClassName"/>
                    </td>
                </tr>
                <tr>
                    <td align="right">状态：</td>
                    <td>
                        <input name="status" id="status" editable="false"
                               class="easyui-combobox" data-options="prompt:'==请选择==',panelHeight:'auto', valueField: 'label', textField: 'value',
                                    data: [{ label: '1',  value: '启用' },{ label: '2', value: '禁用'}]"/>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</div>


<div th:include="common_js :: commJS"></div>
<script type="text/javascript"
        th:src="@{/js/kettle/jobDatasoure.js}"></script>
</body>
</html>
